<html>
<head><meta charset="utf-8"><title>rustc `debug!` when running rustdoc · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc.20.60debug!.60.20when.20running.20rustdoc.html">rustc `debug!` when running rustdoc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198960568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc%20%60debug%21%60%20when%20running%20rustdoc/near/198960568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc.20.60debug!.60.20when.20running.20rustdoc.html#198960568">(May 27 2020 at 22:16)</a>:</h4>
<p>I'd like to have debug information emitted in <code>rustc</code>, for example from <code>rustc_lint::levels</code>. But, when executing <code>rustdoc</code>, i.e.</p>
<div class="codehilite"><pre><span></span><code><span class="nv">RUSTC_LOG</span><span class="o">=</span>rustc_lint::levels ./build/x86_64-apple-darwin/stage1/bin/rustdoc file.rs
</code></pre></div>


<p>I don't get any debug output. Even setting <code>RUSTC_LOG=debug</code> doesn't get me anything. Is it possible to actually get some output? Do I need to compile <code>rustdoc</code> to stage 2?</p>



<a name="198960751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc%20%60debug%21%60%20when%20running%20rustdoc/near/198960751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc.20.60debug!.60.20when.20running.20rustdoc.html#198960751">(May 27 2020 at 22:19)</a>:</h4>
<p>stage 2 won't make any difference</p>



<a name="198960803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc%20%60debug%21%60%20when%20running%20rustdoc/near/198960803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc.20.60debug!.60.20when.20running.20rustdoc.html#198960803">(May 27 2020 at 22:19)</a>:</h4>
<p><span class="user-mention" data-user-id="255061">@LeSeulArtichaut</span> try RUSTDOC_LOG</p>



<a name="198961022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc%20%60debug%21%60%20when%20running%20rustdoc/near/198961022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc.20.60debug!.60.20when.20running.20rustdoc.html#198961022">(May 27 2020 at 22:21)</a>:</h4>
<p>That works, thanks</p>



<a name="198961112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc%20%60debug%21%60%20when%20running%20rustdoc/near/198961112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc.20.60debug!.60.20when.20running.20rustdoc.html#198961112">(May 27 2020 at 22:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/rustc.20.60debug!.60.20when.20running.20rustdoc/near/198960751">said</a>:</p>
<blockquote>
<p>stage 2 won't make any difference</p>
</blockquote>
<p>I wondered if rustdoc was actually running the stage0 compiler, but that wouldn't make sense I guess. Thanks for the help!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>